/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package DataStructures;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;

/**
 *
 * @author Manuel
 */
public class RevisionInformation {

    private long locs;
    private int cabeComplexity;
    private int noOfClasses;
    private int revisionNo;
    private Date date;
    private String commiter;
    private int linesChanged;
    private String comment;
    private ArrayList<FileRevisionInformation> filerevisions;

    public RevisionInformation(){
        filerevisions = new ArrayList<FileRevisionInformation>();
    }




    public ArrayList<FileRevisionInformation> getFilerevisions() {
        return filerevisions;
    }

    public void setFilerevisions(ArrayList<FileRevisionInformation> filerevisions) {
        this.filerevisions = filerevisions;
    }

    public void addFileRevisionInformation(FileRevisionInformation info){
        this.filerevisions.add(info);
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getCommiter() {
        return commiter;
    }

    public void setCommiter(String commiter) {
        this.commiter = commiter;
    }

    public int getLinesChanged() {
        return linesChanged;
    }

    public void setLinesChanged(int linesChanged) {
        this.linesChanged = linesChanged;
    }


    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getDateForDB(){
        String DATE_FORMAT = "yyyy-MM-dd";
    SimpleDateFormat sdf =
          new SimpleDateFormat(DATE_FORMAT);
          return sdf.format(date);

    }

    public int getRevisionNo() {
        return revisionNo;
    }

    public void setRevisionNo(int revisionNo) {
        this.revisionNo = revisionNo;
    }

    public int getNoOfClasses() {
        return noOfClasses;
    }

    public void setNoOfClasses(int noOfClasses) {
        this.noOfClasses = noOfClasses;
    }

    public int getCabeComplexity() {
        return cabeComplexity;
    }

    public void setCabeComplexity(int cabeComplexity) {
        this.cabeComplexity = cabeComplexity;
    }

    public long getLocs() {
        return locs;
    }

    public void setLocs(long locs) {
        this.locs = locs;
    }



}

